package com.dodi.spring.mvc;

import java.io.File;
import java.io.IOException;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;

@Controller
public class MvcTestController {

	@Autowired
	private MvcTestService mvcTestService;
	
	@RequestMapping("/login")
	public String login(String id,User user,MultipartFile uploadFile) throws Exception{
		
		
		UUID uuid = UUID.randomUUID();
		
//		uploadFile.transferTo(new File("E:"+"/"+uuid.toString()+".txt"));
		
		mvcTestService.login();		
		return "mvc";
	}
	
}
